#pragma once

#include "Command.h"
#include "KryptosCommand.h"
#include "KeyOperationsManager.h"
#include "EncryptionOperationsManager.h"

namespace kryptos { namespace controller {

class CommandFactory
{
  public:

    static Command& buildEncryptCommand()
    {
        static EncryptCommand cmd(EncryptionOperationsManager::manager());
        return cmd;
    }

    static Command& buildDecryptCommand()
    {
        static DecryptCommand cmd(EncryptionOperationsManager::manager());
        return cmd;
    }

    static Command& buildDeleteCommand()
    {
        static DeleteCommand cmd;
        return cmd;
    }

    static Command& buildCreateKeyCommand()
    {
        static CreateKeyCommand cmd(KeyOperationsManager::manager());
        return cmd;
    }

    static Command& buildShareKeyCommand()
    {
        static ShareKeyCommand cmd(KeyOperationsManager::manager());
        return cmd;
    }

private:

    CommandFactory(){}

};

}}
